package a.f.l;

import a.c.k;
import a.c.t;
import a.f.*;
import a.f.o;
import a.f.r;
import a.i.q;

import java.util.Iterator;

public class c
  extends r
{
  public static final Object g = "y.layout.router.ChannelEdgeRouter.AFFECTED_EDGES";
  private static final String h = "y.layout.router.CHANNEL_EDGE_ROUTER_NODE_SIZE_CHECKED_DPKEY";
  private rc i;
  private rc j;
  public static int k;
  
  public c()
  {
    h localh = new h();
    localh.a(g);
    this.i = localh;
    i locali = new i();
    locali.a(g);
    this.j = locali;
  }
  
  public boolean canLayout(o paramo)
  {
    int m = g.Cc;
    if (paramo.c("y.layout.router.CHANNEL_EDGE_ROUTER_NODE_SIZE_CHECKED_DPKEY") == null) {
      try
      {
        c(paramo);
      }
      catch (IllegalArgumentException localIllegalArgumentException)
      {
        return false;
      }
    }
    rc localrc = a();
    if ((m != 0) || (localrc != null)) {
      if (m != 0) {
        break label52;
      }
    }
    label52:
    return localrc.canLayout(paramo);
  }
  
  public void doLayout(o paramo)
  {
    int n = g.Cc;
    int m = 0;
    if (n == 0)
    {
      if (paramo.c("y.layout.router.CHANNEL_EDGE_ROUTER_NODE_SIZE_CHECKED_DPKEY") == null)
      {
        c(paramo);
        paramo.a("y.layout.router.CHANNEL_EDGE_ROUTER_NODE_SIZE_CHECKED_DPKEY", q.a(Boolean.TRUE));
        m = 1;
      }
      a(paramo);
    }
    if (n == 0) {
      if (paramo.m() > 0)
      {
        if (n == 0) {
          if (this.i != null)
          {
            if (n == 0) {
              if ((this.i instanceof g))
              {
                if (n != 0) {
                  break label118;
                }
                new f(this.i).doLayout(paramo);
                if (g.Bc == 0) {
                  break label114;
                }
              }
            }
            this.i.doLayout(paramo);
          }
        }
        label114:
        label118:
        if ((n != 0) || (this.j != null)) {
          this.j.doLayout(paramo);
        }
      }
    }
    if (m != 0) {
      paramo.j("y.layout.router.CHANNEL_EDGE_ROUTER_NODE_SIZE_CHECKED_DPKEY");
    }
  }
  
  private void c(o paramo)
  {
    a(paramo, paramo);
  }
  
  private void a(t paramt, dc paramdc)
  {
    int n = g.Cc;
    int m = g.Bc;
    k localk = paramt.c(a.f.c.i.c);
    if ((n != 0) || (localk == null)) {
      localk = q.a(Boolean.FALSE);
    }
    Iterator localIterator = paramt.a();
    label105:
    do
    {
      Object localObject;
      do
      {
        if (!localIterator.hasNext()) {
          return;
        }
        localObject = localIterator.next();
        if (n != 0) {
          break label105;
        }
        if (localk.getBool(localObject)) {
          break;
        }
        a(paramdc, localObject);
        if (n != 0) {
          break label105;
        }
      } while (m == 0);
      b(paramdc, localObject);
    } while (m == 0);
  }
  
  protected void a(dc paramdc, Object paramObject)
    throws IllegalArgumentException
  {
    zc localzc = paramdc.d(paramObject);
    if ((g.Cc != 0) || ((localzc.c() == 0.0D) || (localzc.d() == 0.0D))) {
      throw new IllegalArgumentException("Graph contains nodes with zero width/height. Please enlarge those nodes manually or by using LayoutStage y.layout.MinNodeSizeStage.");
    }
  }
  
  protected void b(dc paramdc, Object paramObject)
    throws IllegalArgumentException
  {
    zc localzc = paramdc.d(paramObject);
    if ((g.Cc != 0) || ((localzc.c() == 0.0D) || (localzc.d() == 0.0D))) {
      throw new IllegalArgumentException("Graph contains group nodes with zero width/height. Please enlarge those nodes manually or by using LayoutStage y.layout.MinNodeSizeStage.");
    }
  }
  
  public void b(rc paramrc)
  {
    this.i = paramrc;
  }
  
  public void c(rc paramrc)
  {
    this.j = paramrc;
  }
  
  public rc b()
  {
    return this.i;
  }
  
  public rc c()
  {
    return this.j;
  }
  
  public static class a_
    extends g
  {
    private Object Dc = c.g;
    public static int Ec;
    
    public boolean canLayout(o paramo)
    {
      int i = g.Cc;
      rc localrc = a();
      if ((i != 0) || (localrc != null)) {
        if (i != 0) {
          break label32;
        }
      }
      label32:
      return localrc.canLayout(paramo);
    }
    
    public void doLayout(o paramo)
    {
      int i = g.Cc;
      a(paramo);
      Object localObject = c();
      k localk = paramo.c(this.Dc);
      if (i == 0)
      {
        if (localk != null)
        {
          b((byte)2);
          b(this.Dc);
        }
      }
      else
      {
        if (i != 0) {
          break label71;
        }
        if (g.Bc == 0) {
          break label62;
        }
      }
      b((byte)0);
      label62:
      label71:
      a("AllowRigModification", Boolean.FALSE);
      f(false);
      super.doLayout(paramo);
      b(localObject);
    }
    
    public void c(Object paramObject)
    {
      this.Dc = paramObject;
    }
    
    public Object V()
    {
      return this.Dc;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.c

 * JD-Core Version:    0.7.0.1

 */